package com.capgemini.cn.authority.core.security;

import org.pac4j.core.matching.PathMatcher;

import java.util.Collection;

/**
 * Created at 2017/9/7
 *
 * @author Andriy
 */
public class SecurityPathMatcher extends PathMatcher {

    public SecurityPathMatcher() {
    }

    public SecurityPathMatcher(String regexpPath) {
        super(regexpPath);
    }

    @Override
    public void setExcludedPatterns(Collection<String> regularExpressions) {
        super.getExcludedPatterns().clear();
        Object[] regularArray = regularExpressions.toArray();
        for (Object regular : regularArray) super.excludeRegex(regular.toString());
    }
}
